package com.lhs.satokenAuth;

import cn.dev33.satoken.stp.StpInterface;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;




import java.util.List;
@Slf4j
@Component
public class StpInterfaceImpl implements StpInterface {

    @Autowired
    private RoleService roleService;



    @Override
    public List<String> getPermissionList(Object loginId, String loginType) {
        return List.of();
    }

    // 获取角色列表
    @Override
    public List<String> getRoleList(Object loginId, String loginType) {
        Long userId = Long.parseLong(loginId.toString());
        return roleService.getRole(userId);

    }
}
